package com.sline.Reflect;

import java.lang.reflect.Constructor;

public class Demo3_Constructor {
    public static void main(String[] args) throws Exception {
        Class clazz = Class.forName("com.sline.Reflect.Person");
        Constructor constructor = clazz.getConstructor(String.class, int.class);
        Person person = (Person)constructor.newInstance("张三", 23);
        System.out.println(person);
    }
}
